import redis
import os

redis_pool = redis.ConnectionPool(
    host= '120.78.12.187',
    password= os.environ.get("CELERY_REDIS_PASSWORD"),
    port='6379',
    max_connections= 100
)

# 获取redis连接
redis_conn = redis.Redis(connection_pool= redis_pool)